<!-- 创作中心（收益明细）-->
<template>
	<z-paging @query='queryList' ref='paging' v-model='list' 
	v-if="isshow"
	class="content">
		<view class="bg" slot='top'>
			<Header :isShowRight="false" title="收益明细" @back='back' arrowColor='#000' textColor='#000'></Header>
		</view>
		<record-withdrawal :list='list'></record-withdrawal>
	</z-paging>

</template>

<script>
	import {
		getEarningsList,
	} from '@/apis/apis.js'
	import Header from '@/components/c_header.vue'
	import recordWithdrawal from '@/pages/mine/modules/recordwithDrawal.vue'
	export default {
		components: {
			Header,
			recordWithdrawal
		},
		data() {
			return {
				isshow:false,
				list: [{
					nickname: '张晓萌',
					money: 998,
					buyNumber: 1,
					orderTotal: 1225,
					time: '2022-08-05 12:00'
				}, {
					nickname: '张晓萌',
					money: 998,
					buyNumber: 1,
					orderTotal: 1225,
					time: '2022-08-05 12:00'
				}]
			}
		},
		onShow() {
			this.isshow = true
		},
		onHide() {
			this.isshow = false
		},
		methods: {
			back() {
				uni.navigateBack()
			},
			queryList(pageNum, pageSize) {
				getEarningsList({
					pageNum: pageNum,
					pageSize: pageSize
				}).then(res => {
					console.log(res)
					this.list = res.data
					this.$refs.paging.complete(res.data);
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		background: #F8F8F8;

		.bg {
			background: #fff;
		}

		.contents {
			width: 92%;
			margin: 0 auto;
			padding-top: 38rpx;

			.item {
				font-size: 28rpx;
				font-family: Source Han Sans CN;
				color: #1A1A1A;
				background: #FFFFFF;
				box-shadow: 0px 1px 45px 0px rgba(174, 185, 190, 0.2000);
				border-radius: 10rpx;
				margin-bottom: 26rpx;

				.firstBox {
					font-size: 36rpx;
					font-family: DIN;
					font-weight: 500;
					color: #FF8809;
					display: flex;
					align-items: center;
					justify-content: space-between;
					border-bottom: 2rpx solid #E9E9E9;
					padding: 32rpx 26rpx 26rpx 26rpx;

					.right {
						display: flex;
						align-items: center;

						&>text {
							font-family: Adobe Heiti Std R;
						}
					}

					&>text {
						font-size: 26rpx;
						font-family: PingFang SC;
						font-weight: bold;
						color: #343434;
					}
				}

				.secondBox {
					display: flex;
					align-items: center;
					margin: 32rpx 0 38rpx 26rpx;

					&>text {
						margin-right: 20rpx;
					}
				}

				.thirdBox {
					display: flex;
					align-items: center;
					justify-content: space-between;
					color: #999999;
					padding: 0 26rpx 34rpx 26rpx;

					.left {
						display: flex;
						align-items: center;
						color: #1A1A1A;

						&>text {
							margin-right: 20rpx;
						}
					}
				}
			}
		}
	}
</style>
